package app_encipher

import (
	"crypto/hmac"
	"crypto/sha256"
	"encoding/hex"
)

func HashHmacSha256(key, message string) string {
	keyBytes := []byte(key)
	messageBytes := []byte(message)

	mac := hmac.New(sha256.New, keyBytes)
	mac.Write(messageBytes)

	hmacSum := mac.Sum(nil)

	return hex.EncodeToString(hmacSum)
}
